package cn.e3mall.activemq;

import cn.e3mall.mapper.TbItemMapper;
import cn.e3mall.pojo.TbItem;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringActiveMq {
	
	private final static Logger log    = LoggerFactory.getLogger(SpringActiveMq.class);
	
    @Test
    public void testJmsTemplate(){
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:spring/applicationContext-dao.xml");
        TbItemMapper bean = applicationContext.getBean(TbItemMapper.class);
        TbItem tbItem = bean.selectByPrimaryKey(536563L);
        System.out.println(tbItem.getSellPoint());
    }
    
    @Test
    public void testLog() {
    	log.debug("测试日志框架");
    	log.info("测试info");
    	log.error("测试error");
    }
}
